package com.szrt.java.day20161222.wu.t02;

import java.util.Scanner;

public class Page2 {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int allNum;		//主题总数
		int lisNum;		//每页显示主题数
		int allPage = 0;	//总页数
		
		System.out.println("主题总量：");
		allNum = sc.nextInt();
		
		System.out.println("每页显示的数量：");
		lisNum = sc.nextInt();
		
		//判断
		if(allNum <0 || lisNum <=0	){
			System.out.println("您输入的信息错误!");
		}
		
		//计算总页数
		if(allNum>0 && lisNum >0){
			allPage = (int)Math.ceil((float)allNum/lisNum);
			System.out.println("共需要的总页数："+allPage);
		}
	}

}
